<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>联系</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../../res/layui/css/layui.css">
    <link rel="stylesheet" href="../../../res/css/global.css">

</head>
<body>
<div class="header-page"></div>

<div class="layui-hide-xs">
    <div class="fly-panel fly-column">
        <div class="layui-container">
            <ul class="layui-clear"  id="titlevue" v-cloak>
                <li class="layui-hide-xs"><a href="/">首页</a></li>
                <li v-for="(item,index) in Colomn">
                    <a :href="'/jie/indexhtml?id='+item.iD" >{{ item.name }}</a>
                </li>
                <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

                <!-- 用户登入后显示 -->
                <li v-if="session2!=null" class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="../user/index.html">我发表的贴</a></li>
                <li v-if="session2!=null" class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="../user/index.html#collection">我收藏的贴</a></li>
            </ul>

            <div class="fly-column-right layui-hide-xs">
                <span class="fly-search"><i class="layui-icon"></i></span>
                <a href="/jie/add" class="layui-btn">发表新帖</a>
            </div>
            <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
                <a href="/jie/add" class="layui-btn">发表新帖</a>
            </div>
        </div>
    </div>
</div>

<div class="layui-container">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;text-align: center">
        <legend>联系作者</legend>
    </fieldset>
        <form class="layui-form"  id="addGoodsForm">
            <div class="layui-form-item">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-block">
                    <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">电话</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="phone" lay-verify="required|phone" placeholder="请输入电话" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-inline">
                        <input type="text" name="email" lay-verify="email" autocomplete="off" placeholder="请输入邮箱" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">详细信息</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入内容" name="maincontent" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
</div>

<div class="fly-footer">
    <p>Copyright &copy; 2020.Company name All rights reserved.</p>
</div>
<script src="../../../res/layui/layui.js"></script>
<script src="../../../js/jquery-2.1.1.min.js"></script>
<script>
    $('.header-page').load('../common/header.html');
</script>
<script src="../../../js/vue.min.js"></script>
<script src="../../../js/title.js"></script>
<script>
    layui.use(['form'],function () {
        var form = layui.form
            ,layer = layui.layer;
        //监听提交
        form.on('submit(demo)', function(data){
            $.ajax({
                async: true,
                type: 'get',
                dataType: 'json',
                data: data.field,
                url: "/contact/send",
                success: function(res){
                }, error: function(e){
                }
            });
            top.layer.msg("提交成功！", {time:2000});
            $("#addGoodsForm")[0].reset();
            layui.form.render();
            return false;
        });
    })
</script>
</body>
</html>